/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thaihung.common;

import AcessDB.Acess;
import java.sql.*;
/**
 *
 * @author bj
 */
public class GetTimer {

    SQLQuery sql = null;
    int time = 0;
    public GetTimer() {
    }
    public int GetTime(String MaDeThi) throws SQLException
    {
        sql = new SQLQuery();
        try
        {
            String query = "Select ThoiGian From DeThi where MaDeThi = '" + MaDeThi + "'";
            ResultSet rs = sql.ExcuteQR(query);
            while(rs.next())
            {
                time = rs.getInt(1);
            }
        }
        catch(SQLException ex)
        {
            System.out.print(ex.toString());
        }
        return time*60;
    }
}
